<template>
     <div>
     <h1>子1 {{n}}</h1>
     <button @click="fn">传递子2</button>
     </div>
</template>
<script>
export default {
    data(){
        return {
            n:555
        }
    },
    methods:{
        fn(){
            this.$emit("onezhi",this.n)
        }
    }
}
</script>
<style lang="scss">

</style>